import {ajax_user} from './ajax';

export const SETBANNER = 'setbanner';
export function getBanner(dispatch){
    ajax_user("live/home/banner")
    .then(responseJson => {
      if(responseJson.result == 1){
        let home_banner = responseJson.data.home;
        let live_banner = responseJson.data.live;
        dispatch({
            type: SETBANNER,
            home_banner: home_banner,
            live_banner: live_banner
        });
      }
    });
}